package com.baidu.Chapter01;

public class ex1_4 {
    public static void main(String[] args) {
        System.out.println("a\ta^2\ta^3");
        for (int i = 0; i < 4; i++) {
            int a=2,b=3,c=4;
            for (int j = 0; j < 3; j++) {
                if(i==1){
                    System.out.print(a);
                    a=a*2;
                }
                else if(i==2) {
                    System.out.print(b);
                    b=b*3;
                }
                else if(i==3) {
                    System.out.print(c);
                    c =c*4;
                }
                else
                    System.out.print(1);
                if(j!=3)
                    System.out.print("\t");
            }
            System.out.println();
        }
    }
}
